package observer;

import java.util.Observable;

public class MainTest8 extends Observable {
    public static void main(String[] args) {
        Subject subject = new Subject();
        Person person = new Person();
        Policeman policeman = new Policeman();
        subject.addObserver(person);
        subject.addObserver(policeman);
        subject.notifyObservers("XXX");
    }
}
